package com.itcast.common.config;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 程序注解配置
 *
 * @author itcast
 */
@Configuration
@EnableCaching
@MapperScan("com.itcast.**.mapper")
public class ApplicationConfig {

    /**
     * 使用undertow启动项目
     *
     * @return
     */
    @Bean
    public UndertowServletWebServerFactory undertowServletWebServerFactory() {
        return new UndertowServletWebServerFactory();
    }
}
